package com.cheney.diandireader.server.service;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.cheney.diandireader.server.dao.BaseDAO;
import com.cheney.diandireader.server.domain.Users;

@Service
public class UserService implements IService{
	
	private BaseDAO<Users> baseDAO;
	
	@Autowired
	public void setSessionFactory(@Qualifier("sessionFactory")SessionFactory sessionFactory){
		baseDAO = new BaseDAO<Users>(sessionFactory,Users.class);
	}
	
	public void save(Users users){
		baseDAO.save(users);
	}
}
